/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.string.test;

public class Main {
    public static void main(String[] args) {
        StringBuffer strb1 = new StringBuffer("Java");// 创建StringBuffer对象str1
        StringBuffer strb2 = new StringBuffer("Java");// 创建StringBuffer对象str2
        System.out.println("****不使用toStri\n" +
                "            System.out.println(\"相等\");ng()方法****");
        if (strb1.equals(strb2)) {
        } else {
            System.out.println("不相等");
        }
        System.out.println("****使用toString()方法****");
        if (strb1.toString().equals(strb2.toString())) {
            System.out.println("相等");
        } else {
            System.out.println("不相等");
        }
    }
}